//
//  UIButton+menuStyle.m
//  hc21SDK
//
//  Created by lanzhongping on 2021/1/7.
//

#import "UIButton+demoStyle.h"
#import "Colors.h"
@implementation UIButton (demoStyle)

-(void)menuStyle {
    self.backgroundColor = [UIColor colorWithRed:51/255.0f green:243/255.0f blue:255/255.0f alpha:1.0f];
    [self setTitleColor:[UIColor darkGrayColor] forState:UIControlStateNormal];
    [self setTitleColor:[UIColor redColor] forState:UIControlStateSelected];

    [self.titleLabel setFont:[UIFont systemFontOfSize:19.0f]];
    self.layer.masksToBounds = YES;
    self.layer.cornerRadius = 8.0f;
    
}

+(UIButton *)functionButton:(NSString *)title
{
    
    UIButton *btn = [UIButton buttonWithType:UIButtonTypeCustom];
    [btn setTitleColor:MAIN_BLUE forState:UIControlStateNormal];
//    btn.backgroundColor = [UIColor lightGrayColor];
//    /*[_ecgBtn addTarget:self action:@selector(goToEcg:) forCont*/rolEvents:UIControlEventTouchUpInside];
    [btn setTitle:title forState:UIControlStateNormal];
    
    btn.layer.borderWidth = 0.5;
    btn.layer.borderColor = MAIN_BLUE.CGColor;
    btn.layer.cornerRadius = 3.f;
    btn.clipsToBounds = YES;
    
    return btn;
}

-(void)functionStyle
{
    
    [self setTitleColor:MAIN_BLUE forState:UIControlStateNormal];
//    btn.backgroundColor = [UIColor lightGrayColor];
//    /*[_ecgBtn addTarget:self action:@selector(goToEcg:) forCont*/rolEvents:UIControlEventTouchUpInside];
    
    self.layer.borderWidth = 0.5;
    self.layer.borderColor = MAIN_BLUE.CGColor;
    self.layer.cornerRadius = 3.f;
    self.clipsToBounds = YES;

}


@end
